const userService="http://124.93.196.45:10001"
function getRequest(url,method,data){
	uni.showLoading({
		title:'加载中',
		mask:true
	})
	var promise=new Promise((resolve,rejects)=>{
		uni.request({
			url:userService+url,
			method:method,
			data:data,
			header:{
				Authorization:uni.getStorageSync('token_j')
			},
			success:function(res){
				setTimeout(function(){
					uni.hideLoading()
				},500)
				resolve(res)
			},
			error:e=>{
				setTimeout(function(){
					uni.hideLoading()
				},500)
				rejects(e)
			}
		})
	})
	return promise
}
module.exports={
	get:getRequest
}